Namespace persistent
    Public Class LaTcIdUpdate

        Public Shared Function laCustomerExists(ByVal custcode As String) As Boolean
            Dim strSQL As String
            strSQL = " select count(*)customer_id from customer_all where custcode = '" & custcode & "' "
            strSQL = strSQL + " and cstype='a' and cslevel in (10, 20, 30) "
            Return myDBConn.myORATable(strSQL).Rows(0).Item(0) > 0
        End Function

        Public Shared Sub updateLACustomerWithTcId(ByVal custCode As String, ByVal tcId As String)
            Dim strSQL As String
            strSQL = " update customer_all set CSTCIDNUMBER='" & tcId & "', CSMODDATE = sysdate where custcode='" & custCode & "' or custcode like '" & custCode & ".%' "
            'LOGLAMA
            ' myDBConn.ORAExecute(strSQL)
            Dim gen As Object = New Web.page.LA_TC_ID_Update()
            myDBConn.ORAExecute_LOG(strSQL, custCode, "", "", "", "Select(updateLACustomerWithTcId)", "LaTcIdUpdate", gen.Session("user"))
        End Sub

    End Class
End Namespace
